#include <stdio.h>

int main(int argc, char *argv[])
{
	int n, i;
	double re;
	scanf("%d", &n);

	re = 1.0;
	for (i = 2; i <=n; i++) {
		re = re * i;
	}

	printf("%.0f\n", re);

	return 0;
}
